<template>
	<view>
		<scroll-view :style="{height: scrollHeight + 'vh'}" :scroll-y="canSlide"  class="list" style="">
			<view v-if="standard === 0" style="font-size: 35rpx;">
				{{introduction_content}}
			</view>
			<view v-if="standard === 1" style="">
				<view v-for="(itme,index) in mechanismData" :key="index" class="curriculumCla" @tap="gokecheng(itme)">
					<view>
						<image :src="itme.face_url" class="imgCla"></image>
					</view>
					<view style="margin-left: 30rpx;" >
						<view style="" class="titleCla">{{itme.newTitle}}</view>
						<view  class="marTop">
							<text class="titleCla" style="color: red;">￥{{itme.amout}}</text>
							<text class="titleCla" style="color: red;margin-left: 20rpx;" v-if="itme.original_price !== 0">￥{{itme.original_price}}/节</text>
						</view>
						<view style="color: #FFAB52;font-size: 22rpx;" class="marTop">{{itme.pay_num}}人已购买</view>
					</view>
					
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		
		props: {
			canSlide: Boolean,
			standard: Number,
			introduction_content: String,
			mechanismData: Array
		},
		
		data() {
			return {
				scrollHeight: ""
			}
		},
		
		onLoad() {
			
			uni.getSystemInfo({
				success: (res) => {
					this.scrollHeight = ((res.screenHeight - 40)/res.screenHeight)*100
					this.$emit("Value",this.scrollHeight)
				}
			})
		},
		
		methods: {
			gokecheng(itme) {
				uni.navigateTo({
					url: '/pages/World/classChannel/classChannel?curriculumId=' + itme.id
				})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.list {
		width: 750rpx;
		box-sizing: border-box;
		padding: 10rpx 50rpx ;
		font-size: 25rpx;
	}
	.curriculumCla {
		width: 100%;
		background: #DCDCDC;
		height: 200rpx;
		margin-top: 30rpx;
		border-radius: 15rpx;
		box-sizing: border-box;
		padding: 25rpx;
		display: flex;
		.marTop {
			margin-top: 20rpx;
		}
		.imgCla {
			width: 150rpx;
			height: 150rpx;
			border-radius: 15rpx;
		}
		.titleCla {
			font-size: 30rpx;
			font-weight: bold;
		}
	}
	.kite-classify-scroll ::-webkit-scrollbar {
		 /* 隐藏滚动条，但依旧具备可以滚动的功能 */
		 display: none;
		 width: 0;
		 height: 0;
		 color: transparent;
		 background: transparent;
	}
	/deep/::-webkit-scrollbar {
		 display: none;
		 width: 0;
		 height: 0;
		 color: transparent;
		 background: transparent;
	}
</style>
